﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Assignment2.Actions
{
    class PlayingAction:Action
    {
        private Integer toyValue, boringValue;

        /// <summary>
        /// This action decrease the amount of toy and boring
        /// </summary>
        /// <param name="toyValue">Amount of food</param>
        /// <param name="boringValue">Amount of boring</param>
        public PlayingAction(ref Integer toyValue, ref Integer boringValue)
        {
            this.toyValue = toyValue;
            this.boringValue = boringValue;
        }

        public void DoAction()
        {
            toyValue--;
            boringValue--;
            boringValue--;

            if (toyValue.Value <= 0)
            {
                toyValue.Value = 0;
            }
            if (boringValue.Value <= 0)
            {
                boringValue.Value = 0;
            }
        }
    }
}
